package com.microframework.netty.config;

import java.util.Map;

import io.netty.handler.ssl.SslContext;

// 客户端配置类
public class ClientConfig {
	private String clientId;
	private String clientVersion = "1.0.0";
	private String clientType = "default";
	private Map<String, Object> metadata;
	private boolean sslEnabled = false;
	private SslContext sslContext;
	private int connectTimeout = 5000;
	private int workerThreads = 1;
	private int readerIdleTime = 30;
	private int writerIdleTime = 15;
	private int allIdleTime = 0;
	private int maxFrameLength = 1024 * 1024; // 1MB
	private boolean statusReportEnabled = true;
	private long statusReportInitialDelay = 5;
	private long statusReportInterval = 30;
	private long shutdownQuietPeriod = 100;
	private long shutdownTimeout = 1000;

	public String getClientId() {
		return clientId;
	}

	public void setClientId(String clientId) {
		this.clientId = clientId;
	}

	public String getClientVersion() {
		return clientVersion;
	}

	public void setClientVersion(String clientVersion) {
		this.clientVersion = clientVersion;
	}

	public String getClientType() {
		return clientType;
	}

	public void setClientType(String clientType) {
		this.clientType = clientType;
	}

	public Map<String, Object> getMetadata() {
		return metadata;
	}

	public void setMetadata(Map<String, Object> metadata) {
		this.metadata = metadata;
	}

	public boolean isSslEnabled() {
		return sslEnabled;
	}

	public void setSslEnabled(boolean sslEnabled) {
		this.sslEnabled = sslEnabled;
	}

	public SslContext getSslContext() {
		return sslContext;
	}

	public void setSslContext(SslContext sslContext) {
		this.sslContext = sslContext;
	}

	public int getConnectTimeout() {
		return connectTimeout;
	}

	public void setConnectTimeout(int connectTimeout) {
		this.connectTimeout = connectTimeout;
	}

	public int getWorkerThreads() {
		return workerThreads;
	}

	public void setWorkerThreads(int workerThreads) {
		this.workerThreads = workerThreads;
	}

	public int getReaderIdleTime() {
		return readerIdleTime;
	}

	public void setReaderIdleTime(int readerIdleTime) {
		this.readerIdleTime = readerIdleTime;
	}

	public int getWriterIdleTime() {
		return writerIdleTime;
	}

	public void setWriterIdleTime(int writerIdleTime) {
		this.writerIdleTime = writerIdleTime;
	}

	public int getAllIdleTime() {
		return allIdleTime;
	}

	public void setAllIdleTime(int allIdleTime) {
		this.allIdleTime = allIdleTime;
	}

	public int getMaxFrameLength() {
		return maxFrameLength;
	}

	public void setMaxFrameLength(int maxFrameLength) {
		this.maxFrameLength = maxFrameLength;
	}

	public boolean isStatusReportEnabled() {
		return statusReportEnabled;
	}

	public void setStatusReportEnabled(boolean statusReportEnabled) {
		this.statusReportEnabled = statusReportEnabled;
	}

	public long getStatusReportInitialDelay() {
		return statusReportInitialDelay;
	}

	public void setStatusReportInitialDelay(long statusReportInitialDelay) {
		this.statusReportInitialDelay = statusReportInitialDelay;
	}

	public long getStatusReportInterval() {
		return statusReportInterval;
	}

	public void setStatusReportInterval(long statusReportInterval) {
		this.statusReportInterval = statusReportInterval;
	}

	public long getShutdownQuietPeriod() {
		return shutdownQuietPeriod;
	}

	public void setShutdownQuietPeriod(long shutdownQuietPeriod) {
		this.shutdownQuietPeriod = shutdownQuietPeriod;
	}

	public long getShutdownTimeout() {
		return shutdownTimeout;
	}

	public void setShutdownTimeout(long shutdownTimeout) {
		this.shutdownTimeout = shutdownTimeout;
	}

}